#pragma once

#include "RFID.h"
#include <string>
using namespace std;

typedef struct  
{
	unsigned char Number[20];
	unsigned char Name[20];
}WorkerInfo;

class RfCardReader
{
public:
	RfCardReader(void);
	~RfCardReader(void);

	bool Open(void);
	bool Close(void);
    
	bool Alive(void);
	bool CardScan(RfidInfo *rfidinfo);
	bool WorkerCardRead(WorkerInfo &wi);
	bool CreditCardRead(string &cardid);

private:
    RFID m_Rfid;
	bool BCD2Str(char* dst, unsigned char *src, short n);
};
